import {
  service as request
} from '@/utils/request'

export function mailSave(data) {
  return request({
    url: '/hawk/email/server/save',
    method: 'post',
    data
  })
}

export function mailEdit(data){
  return request({
    url: '/hawk/email/server/update',
    method: 'put',
    data
  })
}

export function getMailServer() {
  return request({
    url: '/hawk/email/server/list',
    method: 'get'
  })
}

export function exists(serverHost) {
  return request({
    url: '/hawk/email/server/exists',
    method: 'get',
    params: {
      serverHost
    }
  })
}